package org.datascooter.utils.policy;

public enum Constraint {
	EQUAL, NOT_EQUAL, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LIKE, NOT_LIKE, STARTS, ENDS;

	@SuppressWarnings("nls")
	public static String toString(Constraint constraint) {
		if (constraint == null) {
			return "=";
		}
		switch (constraint) {
			case EQUAL:
				return "=";
			case NOT_EQUAL:
				return "<>";
			case GREATER_THAN_OR_EQUAL:
				return ">=";
			case LESS_THAN_OR_EQUAL:
				return "<=";
			case GREATER_THAN:
				return ">";
			case LESS_THAN:
				return "<";
			case LIKE:
				return "LIKE";
			case NOT_LIKE:
				return "NOT LIKE";
			case STARTS:
				return "LIKE";
			case ENDS:
				return "LIKE";
		}
		return "?";
	}
}
